package com.ruoyi.project.outpatient.domain;

import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Date;
import java.util.Objects;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PatientLib extends BaseEntity{
        private Integer patientId;
        private String patientName;
        private Integer patientDept;
        private String patientSex;
        private String patientIdcard;
        private Integer patientAge;
        private Long patientPhone;
        private String patientAddr;
        private Date patientBirth;
        private String patientAlle;

        @Override
        public String toString() {
            return "OutPatient{" +
                    "patientId=" + patientId +
                    ", patientName='" + patientName + '\'' +
                    ", patientDept=" + patientDept +
                    ", patientSex='" + patientSex + '\'' +
                    ", patientIdcard='" + patientIdcard + '\'' +
                    ", patientAge=" + patientAge +
                    ", patientPhone=" + patientPhone +
                    ", patientAddr='" + patientAddr + '\'' +
                    ", patientBirth=" + patientBirth +
                    ", patientAlle='" + patientAlle + '\'' +
                    '}';
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof OutPatient)) return false;
            OutPatient that = (OutPatient) o;
            return Objects.equals( getPatientId(), that.getPatientId() ) && Objects.equals( getPatientName(), that.getPatientName() ) && Objects.equals( getPatientDept(), that.getPatientDept() ) && Objects.equals( getPatientSex(), that.getPatientSex() ) && Objects.equals( getPatientIdcard(), that.getPatientIdcard() ) && Objects.equals( getPatientAge(), that.getPatientAge() ) && Objects.equals( getPatientPhone(), that.getPatientPhone() ) && Objects.equals( getPatientAddr(), that.getPatientAddr() ) && Objects.equals( getPatientBirth(), that.getPatientBirth() ) && Objects.equals( getPatientAlle(), that.getPatientAlle() );
        }

        @Override
        public int hashCode() {
            return Objects.hash( getPatientId(), getPatientName(), getPatientDept(), getPatientSex(), getPatientIdcard(), getPatientAge(), getPatientPhone(), getPatientAddr(), getPatientBirth(), getPatientAlle() );
        }
}
